\(\int (a+b x)^2 \, dx\) [55]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 7, antiderivative size = 14 \[ \int (a+b x)^2 \, dx=\frac {(a+b x)^3}{3 b} \]

[Out]

1/3*(b*x+a)^3/b

Rubi [A] (verified)

Time = 0.00 (sec) , antiderivative size = 14, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {32} \[ \int (a+b x)^2 \, dx=\frac {(a+b x)^3}{3 b} \]

[In]

Int[(a + b*x)^2,x]

[Out]

(a + b*x)^3/(3*b)

Rule 32

Int[((a_.) + (b_.)*(x_))^(m_), x_Symbol] :> Simp[(a + b*x)^(m + 1)/(b*(m + 1)), x] /; FreeQ[{a, b, m}, x] && N
eQ[m, -1]

Rubi steps \begin{align*} \text {integral}& = \frac {(a+b x)^3}{3 b} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.00 (sec) , antiderivative size = 14, normalized size of antiderivative = 1.00 \[ \int (a+b x)^2 \, dx=\frac {(a+b x)^3}{3 b} \]

[In]

Integrate[(a + b*x)^2,x]

[Out]

(a + b*x)^3/(3*b)

Maple [A] (verified)

Time = 0.16 (sec) , antiderivative size = 13, normalized size of antiderivative = 0.93

method result size
default \(\frac {\left (b x +a \right )^{3}}{3 b}\) \(13\)
gosper \(\frac {1}{3} b^{2} x^{3}+a b \,x^{2}+a^{2} x\) \(21\)
norman \(\frac {1}{3} b^{2} x^{3}+a b \,x^{2}+a^{2} x\) \(21\)
parallelrisch \(\frac {1}{3} b^{2} x^{3}+a b \,x^{2}+a^{2} x\) \(21\)
risch \(\frac {b^{2} x^{3}}{3}+a b \,x^{2}+a^{2} x +\frac {a^{3}}{3 b}\) \(29\)

[In]

int((b*x+a)^2,x,method=_RETURNVERBOSE)

[Out]

1/3*(b*x+a)^3/b

Fricas [A] (verification not implemented)

none

Time = 0.21 (sec) , antiderivative size = 20, normalized size of antiderivative = 1.43 \[ \int (a+b x)^2 \, dx=\frac {1}{3} \, b^{2} x^{3} + a b x^{2} + a^{2} x \]

[In]

integrate((b*x+a)^2,x, algorithm="fricas")

[Out]

1/3*b^2*x^3 + a*b*x^2 + a^2*x

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 19 vs. \(2 (8) = 16\).

Time = 0.03 (sec) , antiderivative size = 19, normalized size of antiderivative = 1.36 \[ \int (a+b x)^2 \, dx=a^{2} x + a b x^{2} + \frac {b^{2} x^{3}}{3} \]

[In]

integrate((b*x+a)**2,x)

[Out]

a**2*x + a*b*x**2 + b**2*x**3/3

Maxima [A] (verification not implemented)

none

Time = 0.20 (sec) , antiderivative size = 20, normalized size of antiderivative = 1.43 \[ \int (a+b x)^2 \, dx=\frac {1}{3} \, b^{2} x^{3} + a b x^{2} + a^{2} x \]

[In]

integrate((b*x+a)^2,x, algorithm="maxima")

[Out]

1/3*b^2*x^3 + a*b*x^2 + a^2*x

Giac [A] (verification not implemented)

none

Time = 0.30 (sec) , antiderivative size = 12, normalized size of antiderivative = 0.86 \[ \int (a+b x)^2 \, dx=\frac {{\left (b x + a\right )}^{3}}{3 \, b} \]

[In]

integrate((b*x+a)^2,x, algorithm="giac")

[Out]

1/3*(b*x + a)^3/b

Mupad [B] (verification not implemented)

Time = 0.02 (sec) , antiderivative size = 20, normalized size of antiderivative = 1.43 \[ \int (a+b x)^2 \, dx=a^2\,x+a\,b\,x^2+\frac {b^2\,x^3}{3} \]

[In]

int((a + b*x)^2,x)

[Out]

a^2*x + (b^2*x^3)/3 + a*b*x^2